package com.neusoft.elm.view.impl;

import java.util.Scanner;

import com.neusoft.elm.dao.AdminDao;
import com.neusoft.elm.dao.impl.AdminDaoImpl;
import com.neusoft.elm.po.Admin;
import com.neusoft.elm.view.AdminView;

public class AdminViewImpl implements AdminView {
	
	private Scanner  sc =  new Scanner(System.in);
	
	public Admin login(){
		System.out.println("请输入管理员姓名");
		String adminName = sc.next();
		System.out.println("请输入密码");
		String password = sc.next();
		
		AdminDao adminDao=new AdminDaoImpl();
		Admin admin= adminDao.getAdminByNameByPass(adminName, password);
		
		return admin;
		
	}
}
